f=inline('(x+1025^2)/(x+1025)');
x=[];
y=[];
x(1)=1;
y(1)=0;x(2)=x(1);y(2)=f(x(1));
for i=1:100
    x(1+2*i)=y(2*i);
    x(2+2*i)=x(1+2*i);
    y(1+2*i)=x(1+2*i);
    y(2+2*i)=f(x(2+2*i));
end
plot(x,y,'r');
hold on;
syms x;
ezplot(x,[500,700]);
ezplot(f(x),[500,700]);
axis([500,700,500,700]);
grid on